package com.example.springbootsecurity.controller;

import com.example.springbootsecurity.domain.dto.MsgDto;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author ljw
 * @description
 * @date 2022/8/19 7:12
 */
@Controller
public class HomeController {

    /**
     * 登录后会跳转到/, 再跳转到了 home 页面
     * @param 
     * @author ljw
     * @date 2022/8/26 8:08 
     */
    @RequestMapping("/")
    public String index(Model model) {
        MsgDto msgDto = new MsgDto("测试标题", "测试内容", "额外信息， 只对管理员显示");
        model.addAttribute("msg", msgDto);
        return "home";
    }
}
